package org.wei.p2p.consumer.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wei
 * @date 2022/4/18 15:35
 */
@Slf4j
@CrossOrigin
@RestController
@Tag(name = "TAT",description = "就是这么牛逼")
public class HelloController {

    @Value("${p2p.name:zhang}")
    private String name;


    @GetMapping("/hello111")
    @Operation(summary = "Find by ID",
            tags = {"TAT"},
            description = "I am testing TAT ,find by Id return TAT")
    public String helloConsumer() {
        log.info("NAME: {}", name);
        return "Hello " + name;
    }
}
